<?php
$redis = new Redis();

try {
    //192.168.171.19 是宿主机的ip，1379是端口映射redis服务器的6379端口
    $redis->connect('192.168.1.107',1379);
    $ping = $redis->ping();
    printf("Redis server is running: %s <br>",$ping);

    $key = "test_key";
    //设置 redis 字符串数据
    $redis->set($key, "Redis tutorial");
    // 获取存储的数据并输出
    echo "Stored string in redis:: " . $redis->get($key);

} catch (RedisException $e) {
    echo $e->getMessage();
}



echo "<br>";
echo '<a href="info.php">系统信息</a>';

echo "<br>";
echo '<a href="database.php">数据库</a>';
echo "<br>";
echo '<a href="redis.php">redis</a>';
echo "<br>";
echo '<a href="text.txt">文本</a>';
